* {
  border: 0;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --hue: 223;
  --off-hue: 3;
  --on-hue1: 123;
  --on-hue2: 168;
  --fg: hsl(var(--hue), 10%, 90%);
  --primary: var(--color-primary);
  --primary-hover: var(--color-primary-hover);
  --trans-dur: 0.6s;
  --trans-timing: cubic-bezier(0.65, 0, 0.35, 1);
}

/*body,*/
input {
  font: 1em/1.5 sans-serif;
}

.container {
  color: var(--fg);
  display: flex;
  font-size: calc(40px + (60 - 40) * (100vw - 320px) / (2560 - 320));
  transition:
    background-color var(--trans-dur),
    color var(--trans-dur);
}

.switch,
.switch__input {
  -webkit-tap-highlight-color: #0000;
}

.switch {
  display: block;
  margin: auto;
  position: relative;
  width: 5em;
  height: 3em;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.switch:hover {
  transform: scale(1.05);
}

.switch:active {
  transform: scale(0.98);
}

.switch__base_outer,
.switch__base_inner {
  display: block;
  position: absolute;
}

.switch__base_outer {
  border-radius: 1.25em;
  box-shadow:
    -0.125em -0.125em 0.25em hsl(var(--hue), 10%, 30%),
    0.125em 0.125em 0.125em hsl(var(--hue), 10%, 30%) inset,
    0.125em 0.125em 0.25em hsl(0, 0%, 0%),
    -0.125em -0.125em 0.125em hsl(var(--hue), 10%, 5%) inset;
  top: 0.125em;
  left: 0.125em;
  width: 4.75em;
  height: 2.75em;
}

.switch__base_inner {
  border-radius: 1.125em;
  box-shadow:
    -0.25em -0.25em 0.25em hsl(var(--hue), 10%, 30%) inset,
    0.0625em 0.0625em 0.125em hsla(var(--hue), 10%, 30%),
    0.125em 0.25em 0.25em hsl(var(--hue), 10%, 5%) inset,
    -0.0625em -0.0625em 0.125em hsla(var(--hue), 10%, 5%);
  top: 0.375em;
  left: 0.375em;
  width: 4.25em;
  height: 2.25em;
}

.switch__base_neon {
  display: block;
  overflow: visible;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
}

.switch__base_neon path {
  stroke-dasharray: 0 104.26 0;
  transition: stroke-dasharray var(--trans-dur) var(--trans-timing), filter var(--trans-dur) var(--trans-timing);
  filter: drop-shadow(0 0 2px var(--primary)) drop-shadow(0 0 6px var(--primary));
}

.switch:hover .switch__base_neon path {
  filter: drop-shadow(0 0 4px var(--primary)) drop-shadow(0 0 10px var(--primary)) drop-shadow(0 0 16px var(--primary));
}

.switch:active .switch__base_neon path {
  filter: drop-shadow(0 0 6px var(--primary)) drop-shadow(0 0 14px var(--primary)) drop-shadow(0 0 20px var(--primary));
}

.switch__input {
  outline: transparent;
  position: relative;
  width: 100%;
  height: 100%;
  -webkit-appearance: none;
  appearance: none;
}

.switch__input:before {
  border-radius: 0.125em;
  box-shadow: 0 0 0 0.125em hsla(var(--hue), 90%, 50%, 0);
  content: "";
  display: block;
  position: absolute;
  inset: -0.125em;
  transition: box-shadow 0.15s linear;
}

.switch__input:focus-visible:before {
  box-shadow: 0 0 0 0.125em var(--primary);
}

.switch__knob,
.switch__knob_container {
  border-radius: 1em;
  display: block;
  position: absolute;
}

.switch__knob {
  background-color: hsl(var(--hue), 10%, 15%);
  background-image:
    radial-gradient(88% 88% at 50% 50%, hsl(var(--hue), 10%, 20%) 47%, hsla(var(--hue), 10%, 20%, 0) 50%),
    radial-gradient(88% 88% at 47% 47%, hsl(var(--hue), 10%, 85%) 45%, hsla(var(--hue), 10%, 85%, 0) 50%),
    radial-gradient(65% 70% at 40% 60%, hsl(var(--hue), 10%, 20%) 46%, hsla(var(--hue), 10%, 20%, 0) 50%);
  box-shadow:
    -0.0625em -0.0625em 0.0625em hsl(var(--hue), 10%, 15%) inset,
    -0.125em -0.125em 0.0625em hsl(var(--hue), 10%, 5%) inset,
    0.75em 0.25em 0.125em hsla(0, 0%, 0%, 0.8);
  width: 2em;
  height: 2em;
  transition: transform var(--trans-dur) var(--trans-timing);
}

.switch__knob_container {
  overflow: hidden;
  top: 0.5em;
  left: 0.5em;
  width: 4em;
  height: 2em;
}

.switch__knob_neon {
  display: block;
  width: 2em;
  height: auto;
}

.switch__knob_neon circle {
  opacity: 0;
  stroke-dasharray: 0 90.32 0 54.19;
  transition:
    opacity var(--trans-dur) steps(1, end),
    stroke-dasharray var(--trans-dur) var(--trans-timing);
}

.switch__knob_shadow {
  border-radius: 50%;
  box-shadow: 0.125em 0.125em 0.125em hsla(0, 0%, 0%, 0.9);
  display: block;
  position: absolute;
  top: 0.5em;
  left: 0.5em;
  width: 2em;
  height: 2em;
  transition: transform var(--trans-dur) var(--trans-timing);
}

.switch__led {
  background-color: var(--primary);
  border-radius: 50%;
  box-shadow:
    0 -0.0625em 0.0625em rgba(0, 0, 0, 0.2) inset,
    0 0 0.125em rgba(0, 0, 0, 0.12),
    0 0 0.125em rgba(0, 0, 0, 0.12),
    0 0 0.35em var(--primary),
    0.125em 0.125em 0.125em hsla(0, 0%, 0%, 0.5);
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 0.25em;
  height: 0.25em;
  transition:
    background-color var(--trans-dur) var(--trans-timing),
    box-shadow var(--trans-dur) var(--trans-timing);
}

.switch:hover .switch__led {
  box-shadow:
    0 -0.0625em 0.0625em rgba(0, 0, 0, 0.2) inset,
    0 0 0.125em rgba(0, 0, 0, 0.12),
    0 0 0.125em rgba(0, 0, 0, 0.12),
    0 0 0.5em var(--primary),
    0 0 0.8em var(--primary),
    0.125em 0.125em 0.125em hsla(0, 0%, 0%, 0.5);
}

.switch:active .switch__led {
  box-shadow:
    0 -0.0625em 0.0625em rgba(0, 0, 0, 0.2) inset,
    0 0 0.125em rgba(0, 0, 0, 0.12),
    0 0 0.125em rgba(0, 0, 0, 0.12),
    0 0 0.7em var(--primary),
    0 0 1.2em var(--primary),
    0.125em 0.125em 0.125em hsla(0, 0%, 0%, 0.5);
}

.switch__text {
  overflow: hidden;
  position: absolute;
  width: 1px;
  height: 1px;
}

.switch__input:checked~.switch__led {
  background-color: var(--primary-hover);
  box-shadow:
    0 -0.0625em 0.0625em rgba(0, 0, 0, 0.25) inset,
    0 -0.125em 0.125em rgba(0, 0, 0, 0.15),
    0 0.125em 0.125em rgba(0, 0, 0, 0.15),
    0 0 0.6em var(--primary-hover),
    0 0 1em var(--primary-hover),
    0.125em 0.125em 0.125em hsla(0, 0%, 0%, 0.5);
}

.switch__input:checked~.switch__base_neon path {
  stroke-dasharray: 52.13 0 52.13;
  filter: drop-shadow(0 0 3px var(--primary-hover)) drop-shadow(0 0 10px var(--primary-hover)) drop-shadow(0 0 16px var(--primary-hover));
}

.switch:hover .switch__input:checked~.switch__base_neon path {
  filter: drop-shadow(0 0 5px var(--primary-hover)) drop-shadow(0 0 15px var(--primary-hover)) drop-shadow(0 0 25px var(--primary-hover));
}

.switch:active .switch__input:checked~.switch__base_neon path {
  filter: drop-shadow(0 0 7px var(--primary-hover)) drop-shadow(0 0 20px var(--primary-hover)) drop-shadow(0 0 30px var(--primary-hover));
}

.switch__input:checked~.switch__knob_shadow,
.switch__input:checked~.switch__knob_container .switch__knob {
  transform: translateX(100%);
}

.switch__input:checked~.switch__knob_container .switch__knob_neon circle {
  opacity: 1;
  stroke-dasharray: 45.16 0 45.16 54.19;
  transition-timing-function: steps(1, start), var(--trans-timing);
}